<?
if(isset($_GET[cust_id]) && $opr=='del')
{
	mysql_query("delete from customer where cust_id = '".$_GET[cust_id]."' ");
	mysql_query("delete from ordernow where odn_cust = '".$_GET[cust_id]."' ");

}
?>
<h1 style='color:#9999CC;font-size:18px;'><b>.:: Customer Member ::.</b></h1><br>
<table width='95%' border=0 cellspacing=1 style='color:black;font-weight:bold'>
<tr bgcolor=#036392 style='color:white' height='45'>
	<td align=center>ID</td>
	<td align=center>NAME</td>
	<td align=center>TEL.</td>
	<td align=center>Email</td>
	<td align=center>Delete</td>


</tr>
<?
	$rs  =  Q2("select * from customer order by cust_id ASC");
	foreach($rs as $r)
	{
?>
<tr bgcolor=#A3E8FC height='30'>
	<td align=center>C<?=$r[cust_id]?></td>
	<td style='padding-left:5px;'> <a href='?body=cust_order&cust_id=<?=$r[cust_id]?>'><?=$r[cust_firstname]." ".$r[cust_lastname]?></a></td>
	<td> <?=$r[cust_tel]?></td>
	<td> <?=$r[cust_email]?></td>
	<td align=center><a href='?body=customer&opr=del&cust_id=<?=$r[cust_id]?>' style='color:red' onclick='if(confirm("Are you sure to delete ?")) return true; else return false;'>del</a></td>
</tr>
<?
	}
?>
</table>
